<?php if((int)$this->last > 1): ?>
<div class="pagination" >
    <div>
        <!-- First page link -->
        <?php if (isset($this->previous)): ?>
              <a href="<?php echo $this->url(array('page' => $this->first)); ?>"><img src="/images/button-paging-first.gif"/></a> 
        <?php else: ?>
                <span class="disabled"><img src="/images/button-paging-first.gif"/></span> 
        <?php endif; ?>
    
        <!-- Previous page link -->
    
        <?php if (isset($this->previous)): ?>
              <a href="<?php echo $this->url(array('page' => $this->previous)); ?>"> <img src="/images/button-paging-previous.gif"/></a> 
        <?php else: ?>
            <span class="disabled"><img src="/images/button-paging-previous.gif"/></span> 
        <?php endif; ?>
        <!-- Numbered page links -->
        <?php foreach ($this->pagesInRange as $page): ?>
            <?php if ($page != $this->current): ?>
                <a href="<?php echo $this->url(array('page' => $page)); ?>"><?php echo $page; ?></a>
            <?php else: ?>
                <?php echo $page; ?>
            <?php endif; ?>
        <?php endforeach; ?>
        <!-- Next page link -->
        <?php if (isset($this->next)): ?>
               <a href="<?php echo $this->url(array('page' => $this->next)); ?>"><img src="/images/button-paging-next.gif"/> </a> 
        <?php else: ?>
             <span class="disabled"><img src="/images/button-paging-next.gif"/> </span> 
        <?php endif; ?>
        <!-- Last page link -->
        <?php if (isset($this->next)): ?>
              <a href="<?php echo $this->url(array('page' => $this->last)); ?>"><img src="/images/button-paging-last.gif"/></a>
        <?php else: ?>
            <span class="disabled"><img src="/images/button-paging-last.gif"/></span>
        <?php endif; ?>
        (<?php echo $this->current ?>/<?php echo $this->last ?>)
    </div>
 </div>
<?php endif ?>